//
//  VideoCollectionViewCell.m
//  Tongcheng
//
//  Created by 邢广范 on 2017/4/3.
//  Copyright © 2017年 Tongcheng. All rights reserved.
//

#import "VideoCollectionViewCell.h"
#import "UIImageView+AFNetworking.h"

@interface VideoCollectionViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *backImg;
@property (weak, nonatomic) IBOutlet UILabel *playCount;
@property (weak, nonatomic) IBOutlet UIView *backView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@end

@implementation VideoCollectionViewCell

- (void)setModel:(VideoListDataModel *)model
{
    _model = model;
    [self.backImg setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:nil];
    self.playCount.text = [NSString stringWithFormat:@"%@播放", model.views];
    self.titleLabel.text = model.menolog;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    self.layer.cornerRadius = 5;
    self.layer.masksToBounds = YES;
    self.playCount.backgroundColor = RGBA(0x000000, 0.3);
    self.backView.backgroundColor = RGBA(0x000000, 0.3);
    
    
    // Initialization code
}

@end
